home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)TA / (A)TAP.ADF / Documentation / calc.doc < prev    next >
Text File  |  1988-10-23  |  2KB  |  57 lines

  1. DOCUMENTATION FOR CALC
  2.  
  3.         Calc is a CLI command which accepts mathematical expressions as
  4. its arguments and outputs the result.  When distributing this program
  5. please keep the executeable, source code, and documentation together.
  6.  
  7.         Operator precedence does apply and parenthesis of multiple depths 
  8. may be added for precedence clarification. The expression may have white 
  9. space, but I advise caution against doing this. If Calc says "Could not 
  10. get Command Line" when you type in a mathematical expression this probably
  11. means that you used too much white space.  Simply retyping this command 
  12. without the spaces will fix the error. Calc also supports the following 
  13. math functions and constants:
  14.  
  15.         sin (expr) - returns the sine where expr is in radians
  16.         cos (expr) - returns the cosine where expr is in radians
  17.         tan (expr) - returns the tangent where expr is in radians
  18.         atn (expr) - returns the inverse tangent where expr is in radians
  19.         rad (expr) - converts radian expr into degrees
  20.         deg (expr) - converts degree expr into radians
  21.         exp (expr) - returns the exponetial of expr
  22.         ln (expr)  - returns the natural log of expr
  23.         log (expr) - returns the common logarithm of expr (to the base 10)
  24.         sqrt (expr) - returns the square root of expr
  25.  
  26.         e  - constant equaling 2.7182818284
  27.         pi - constant equaling 3.1415926536
  28.  
  29. EXAMPLES:
  30.  
  31.         1> calc 2 + 2
  32.              4.000000
  33.         1> calc 2+3*3+1
  34.             12.000000
  35.         1> calc pi
  36.              3.141592
  37.         1> calc ln (e)
  38.              1.000000
  39.         1> calc sin (sqrt(3))+1
  40.              1.987027
  41.  
  42. As you can see, you may nest the math functions however you want.  This 
  43. version of Calc requires that you type the math functions and constants
  44. in lower case.  This program is Mailware, meaning that if you like it
  45. you have to write me a letter telling me so.  I have a problem with the
  46. Shareware concept so if I can't inflate my pocket why not my ego.  
  47. Seriously, though, this program comes to you free of charge and free of
  48. guilt that you're ripping off a starving programmer.  I'd love to hear
  49. your suggestions on how to improve Calc so contact me at the following
  50. address.  Also, if you'd like to see any other Amiga applications let me
  51. know.  Thanks, and I hope you enjoy my first contribution to AmigaDom.
  52.  
  53.  
  54.                         Bob Jones
  55.                         RR #1, Box 150
  56.                         York, ME  03909
  57.